﻿using MediatR;
using RBAC.LuFang.API.Application.Command.deepprocessingCommand;
using RBAC.LuFang.Domain.Traceability;
using RBAC.LuFang.Domin.Services.TraceabilityService;

namespace RBAC.LuFang.API.Application.CommandHandlers.deepprocessingCommandHandler
{
    //反填深加工信息
    public class GetdeepprocessingCommandHandler:IRequestHandler<GetdeepprocessingCommand, deepprocessing>
    {
        private readonly IdeepprocessingService _deepService;

        public GetdeepprocessingCommandHandler(IdeepprocessingService deepService)
        {
            _deepService = deepService;
        }

        public async Task<deepprocessing> Handle(GetdeepprocessingCommand request, CancellationToken cancellationToken)
        {
            return await _deepService.Getdeepprocessing(request.goodsid);
        }
    }
}
